@extends('admin.main')
@section('body')
    <div class="main-title">
        <h2>{{$title}}</h2>
    </div>
    <div class="tab-wrap">
        <div class="tab-content">
            <form action="" method="post" class="form-horizontal">
                <!-- 基础 -->
                <div id="tab1" class="tab-pane in tab1">
                    <div class="form-item">
                        <label class="item-label">
                            用户ID<span class="check-tips"></span>
                        </label>
                        <div class="controls">
                            <input type="text" id="mid" name="mid" @if($info) readonly @endif class="text input-large" placeholder=""
                                   value="{{$info ? $info['id'] : ''}}">
                            <span style="color: #4bbd00" id="mid-show"></span>
                        </div>
                    </div>
                    @if($info)
                        <div class="form-item">
                            <label class="item-label">
                                用户昵称<span class="check-tips"></span>
                            </label>
                            <div class="controls">
                                <input type="text" readonly class="text input-large" placeholder=""
                                       value="{{$info ? $info['nickname'] : ''}}">
                            </div>
                        </div>
                    @endif
                    <div class="form-item">
                        <label class="item-label">
                            渠道分销提成比例<span class="check-tips">(每桶提成佣金 元/桶)</span>
                        </label>
                        <div class="controls">
                            <input type="number" name="refer_ratio" class="text input-large" placeholder=""
                                   value="{{$info ? $info['refer_ratio'] : 0}}">
                        </div>
                    </div>
                    @if($refer)
                        <div class="form-item">
                            <label class="item-label">
                                渠道推广码<span class="check-tips"></span>
                            </label>
                            <div class="controls">
                                <input type="text" readonly @if(!$info) name="refer_code" @endif class="text input-large" placeholder=""
                                       value="{{$refer ? $refer['code'] : ''}}">
                            </div>
                        </div>
                    @endif
                    <!-- 高级 -->
                    <div class="form-item">
                        <button type="submit" id="submit" class="btn submit-btn ajax-post"
                                target-form="form-horizontal">确 定
                        </button>
                        <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
@endsection